
cc.Class({
    extends: cc.Component,

    properties: {
        title : {
            default : null,
            type : cc.Label
        },
        content : {
            default : null,
            type : cc.Label
        },
    },
    onLoad () { 
    },
    show(args){
        this.title.string = args.title;
        this.content.string = args.content;
        this.enterCallback = args.enterCallback;
        this.cancelCallback = args.cancelCallback;
    },
    enterClick(){
        cc.vv.audioMgr.playSFX("ui_button");
        if(this.enterCallback){
            this.enterCallback();
        }
        this.node.destroy();
    },
    closeClick(){
        cc.vv.audioMgr.playSFX("ui_button");
        if(this.cancelCallback){
            this.cancelCallback();
        }
        this.node.destroy();
    },
});
